package com.webqq.client.service;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by Administrator on 2017/9/27 0027.
 */
@FeignClient(name = "webqq",url = "http://10.10.100.81:5000")
public interface WebqqService {
    /**
     * 获取登录用户信息
     */
    @GetMapping("/openqq/get_user_info")
    String getUserInfo() throws Exception;

    /**
     * 获取好友信息
     * @return
     * @throws Exception
     */
    @GetMapping("/openqq/get_friend_info")
    String getFriendInfo()throws Exception;

    /**
     * 搜索好友
     * @param uId QQ号
     * @return
     * @throws Exception
     */
    @GetMapping("/openqq/search_friend")
    String searchFriend(@RequestParam("uid") long uId) throws Exception;

    /**
     * 搜索群
     * @param uId
     * @return
     * @throws Exception
     */
    @GetMapping("/openqq/search_group")
    String searchGroup(@RequestParam("uid") long uId)throws Exception;
    /**
     * 获取群信息
     * @return
     * @throws Exception
     */
    @GetMapping("/openqq/get_group_info")
    String getGroupInfo() throws Exception;

    /**
     * 获取群信息排除群成员
     * @return
     * @throws Exception
     */
    @GetMapping("/openqq/get_group_basic_info")
    String getGroupBasicInfo() throws Exception;

    /**
     * 获取讨论组信息
     * @return
     * @throws Exception
     */
    @GetMapping("/openqq/get_discuss_info")
    String getDiscussInfo() throws Exception;

    /**
     * 给好友发送消息
     * @param uId
     * @param content
     * @return
     */
    @GetMapping("/openqq/send_friend_message")
    String sendFriendMessage(@RequestParam("uid")Long uId,
                             @RequestParam("content") String content ) throws Exception;

    /**
     * 发送群组消息
     * @param uId
     * @param content
     * @return
     * @throws Exception
     */
    @GetMapping("/openqq/send_group_message")
    String sendGroupMessage(@RequestParam("uid")Long uId,
                            @RequestParam("content") String content ) throws Exception;

    /**
     * 发送讨论组消息
     * @param uId
     * @param content
     * @return
     * @throws Exception
     */
    @GetMapping("/openqq/send_discuss_message")
    String sendDiscussMessage(@RequestParam("uid")Long uId,
                              @RequestParam("content") String content ) throws Exception;

    /**
     * 查看事件
     * @return
     * @throws Exception
     */
    @GetMapping("/openqq/check_event")
    String checkEvent() throws Exception;

    /**
     * 踢出群成员
     * @param groupUid
     * @param memberUid
     * @return
     * @throws Exception
     */
    @GetMapping("/openqq/kick_group_member")
    String kickGroupMember(@RequestParam("group_uid") Long groupUid,
                           @RequestParam("member_uid") String memberUid ) throws Exception;

    /**
     * 查看客户端启动情况
     * @return
     * @throws Exception
     */
    @GetMapping("/openqq/get_client_info")
    String getClientInfo()throws Exception;

    @GetMapping("/openqq/stop_client")
    String stopClient()throws Exception;
}
